{% extends "D3hdvHdvBundle::layout.html.twig" %}
{% block title %}
Hdv - Inscription {{ parent() }}
{% endblock %}

{% block body %}


{% if erreur is defined %}
		<script>
			alert("Erreur : {{ erreur  }} !");
		</script>
{% endif %}

{% if succes is defined %}
		<script>
			alert("Succes : {{ succes  }} !");
		</script>


{% endif %}

	<h1>S'inscrire sur l'hôtel des ventes</h1>
		
	<form action="{{ path('D3hdv_hdv_inscription_check') }}" method="post" {{ form_enctype(form) }}>
		{{ form_widget(form) }}	
		</br>
		<input type="submit" value="Inscription" />
	</form>
<br />

<script>

$("input[type=checkbox]").click(function() {
		var id_checked = $(this).attr('id');
		if ($(this).is(':checked')) {
			alert('Mot de passe plus caché!');
			$("#hdvinscription_mdp").prop("type", "text");
			$("#hdvinscription_mdpconfirme").prop("type", "text");
		} else {
			alert('Mot de passe à nouveau caché!');
			$("#hdvinscription_mdp").prop("type", "password");
			$("#hdvinscription_mdpconfirme").prop("type", "password");
		}
	});

</script>

{% endblock %}
